package cn.openread.es;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.elasticsearch.core.ElasticsearchRestTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * 用途：一切为了业务
 * <p>
 * Created by simon on 2020/3/7.
 */
@RestController
@RequestMapping("/esIndex")
public class EsIndexController {
//    @Autowired
//    private ElasticsearchRestTemplate elasticsearchRestTemplate;
//
//
//    @GetMapping("/queryIndex")
//    public Map<String, Object> queryIndex() {
//        return this.elasticsearchRestTemplate.getMapping(Item.class);
//    }
//
//    @GetMapping("/createIndex")
//    public Boolean createIndex() {
//        return this.elasticsearchRestTemplate.createIndex(Item.class);
//    }
//
//    @GetMapping("/editIndex")
//    public Boolean editIndex() {
//        return this.elasticsearchRestTemplate.putMapping(Item.class);
//    }
//
//    @GetMapping("/deleteIndex")
//    public Boolean deleteIndex() {
//        return this.elasticsearchRestTemplate.deleteIndex(Item.class);
//    }
}
